<template>
	<view class="page">
		<!-- 导航栏 -->
		<view class="navbar">
			<view class="navbar-content">
				<view class="back-button" @click="goBack">
					<uni-icons type="back" size="30" color="#ffff"></uni-icons>
				</view>
				<text class="navbar-title">消费记录</text>
			</view>
		</view>
		
		<!-- 蓝色背景 -->
		<view class="blue-background"></view>
		
		<!-- 悬浮内容 -->
		<view class="content-overlay">
			<view class="transaction-list">
				<view v-for="(item, index) in transactionList" :key="index" class="transaction-item">
					<view class="transaction-info">
						<text class="transaction-title">{{ item.title }}</text>
						<text class="transaction-date">{{ item.date }}</text>
					</view>
					<text class="transaction-amount">{{ item.amount }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				transactionList: [
					{
						title: '大美汽车维修店-洗车',
						date: '2023.3.11 11:09',
						amount: '-50元'
					},
					{
						title: '大美汽车维修店-洗车',
						date: '2023.3.11 11:09',
						amount: '-50元'
					},
					{
						title: '大美汽车维修店-洗车',
						date: '2023.3.11 11:09',
						amount: '-50元'
					},
					{
						title: '大美汽车维修店-洗车',
						date: '2023.3.11 11:09',
						amount: '-50元'
					}
				]
			}
		},
		methods: {
			goBack() {
				uni.navigateBack();
			}
		}
	}
</script>

<style>
	.page {
		background-color: #ffffff;
		min-height: 100vh;
		position: relative;
	}
	
	/* 导航栏 */
	.navbar {
		width: 100%;
		height: 88rpx;
		background: linear-gradient(120deg, #1f78ff 0%, #2f89ff 100%);
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.navbar-content {
		width: 100%;
		height: 100%;
		display: flex;
		align-items: center;
		position: relative;
		padding: 0 24rpx;
	}
	
	.back-button {
		position: absolute;
		left: 24rpx;
		width: 60rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.navbar-title {
		color: #ffffff;
		font-size: 32rpx;
		font-weight: 600;
		text-align: center;
		width: 100%;
	}
	
	/* 蓝色背景 */
	.blue-background {
		position: absolute;
		top: 88rpx;
		left: 0;
		width: 100%;
		height: 200rpx;
		background: linear-gradient(120deg, #1f78ff 0%, #2f89ff 100%);
	}
	
	/* 悬浮内容 */
	.content-overlay {
		position: absolute;
		top: 118rpx;
		left: 50%;
		transform: translateX(-50%);
		width: 95%;
		max-width: 700rpx;
		background: #ffffff;
		border-radius: 20rpx 20rpx 0 0;
		min-height: calc(100vh - 100rpx);
		box-shadow: 0 -4rpx 20rpx rgba(0,0,0,0.1);
	}
	
	/* 交易列表 */
	.transaction-list {
		padding: 40rpx 24rpx;
	}
	
	.transaction-item {
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding: 32rpx 0;
		border-bottom: 1rpx solid #f0f0f0;
	}
	
	.transaction-item:last-child {
		border-bottom: none;
	}
	
	.transaction-info {
		display: flex;
		flex-direction: column;
		flex: 1;
	}
	
	.transaction-title {
		color: #333333;
		font-size: 32rpx;
		margin-bottom: 8rpx;
	}
	
	.transaction-date {
		color: #999999;
		font-size: 26rpx;
	}
	
	.transaction-amount {
		color: #333333;
		font-size: 32rpx;
	}
</style>
